$--top-header-height: 60px; // 顶部高度
$--left-side-width: 220px; // 左侧菜单栏宽度
$--left-side-scroll-width: 240px; // 左侧菜单栏宽度 + 20

body {
  background: #1d458d;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.layadmin-pagetabs {
  position: relative;
  height: 40px;
  line-height: 40px;
  padding: 0 80px 0 40px;
  /* border-bottom: 2px solid #292B34; */
  background-color: #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
  transition: all .3s;

  .layui-tab {
    margin: 0;
    overflow: hidden;
  }

  .layui-tab-title {
    height: 40px;
    border: none;

    li {
      position: relative;
      min-width: 0;
      line-height: 40px;
      max-width: 160px;
      text-overflow: ellipsis;
      overflow: hidden;
      border-right: 1px solid #f6f6f6;
      vertical-align: top;

      &:hover,
      &.layui-this {
        background-color: #f6f6f6;
      }

      &:hover:after {
        width: 100%;
      }

      &:after {
        content: '';
        position: absolute;
        bottom: 0;
        top: unset;
        left: 0;
        width: 0;
        height: 2px;
        border-radius: 0;
        background-color: #292B34;
        transition: all .3s;
        font-size: unset;
      }

      &.layui-this:after {
        width: 100%;
        border: none;
        height: 2px;
        background-color: #292B34;
      }

      &:first-child {
        padding-right: 15px;

        .layui-tab-close {
          display: none;
        }
      }

      .layui-icon {
        font-size: 14px;
      }

      .layui-tab-close {
        position: relative;
        display: inline-block;
        width: 18px;
        height: 18px;
        line-height: 20px;
        margin-left: 8px;
        text-align: center;
        font-size: 14px;
        color: #c2c2c2;
        transition: all .2s;

        &:hover {
          border-radius: 2px;
          background-color: #FF5722;
          color: #fff
        }
      }
    }
  }

  .layui-icon-prev {
    left: 0;
    border-left: none;
    border-right: 1px solid #f6f6f6;

    &:before {
      font-size: 14px;
      color: #999;
    }
    &:hover {
      &:before {
        color: #333;
      }
    }
  }

  .layui-icon-next {
    right: 40px;
    right: 40px;

    &:before {
      font-size: 14px;
      color: #999;
    }
    &:hover {
      &:before {
        color: #333;
      }
    }
  }

  .layui-icon-down {
    right: 0;
    &:before {
      color: #999;
    }
    &:hover {
      &:before {
        color: #333;
      }
    }
  }

  .layadmin-tabs-control {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
    box-sizing: border-box;
    border-left: 1px solid #f6f6f6;
  }

  .layadmin-tabs-select {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: none;

    .layui-nav-child {
      top: 40px;
      left: auto;
      right: 0;

      dd.layui-this {
        background-color: #f2f2f2!important;
      }
    }

    .layui-nav-item {
      pline-height: 40px;

      a {
        color: #666;
        height: 40px;
      }
    }
  }
}

.reset-layout {
  position: relative;
  height: 100%;

  .layui-header {
    height: $--top-header-height;
    background-color: rgba(0, 0, 0, .3);

    .layui-logo {
      width: 200px;
      text-align: left;

      img {
        margin-left: 50px;
      }
    }

    .layui-nav.layui-layout-left {
      left: 200px;
      height: 60px;
    }

    .layui-nav.layui-layout-right {
      height: 60px;
      > .layui-nav-item {
        margin-left: 10px;
        a {
          padding: 0 10px;
        }
        &.user-item {
          a {
            padding-right: 20px;
          }
        }
      }
      .layui-badge {
        position: relative;
        margin: 0;
        padding: 0 3px;
        height: 16px;
      }
    }
  }

  .layui-side {
    width: $--left-side-width;
    top: $--top-header-height;

    &.layui-bg-black {
      background-color: rgba(0, 0, 0, .5) !important;
    }

    .layui-side-scroll {
      width: $--left-side-scroll-width;
    }

    .layui-nav.layui-nav-tree {
      width: $--left-side-width;
      background: none;

      .layui-nav-bar {
        width: 5px;
        background-color: #205b9e;
        z-index: 1;
      }

      .layui-nav-item {
        position: relative;
        cursor: pointer;
        z-index: 1;

        &.layui-nav-itemed > a {
          background-color: rgba(32, 91, 158, .1);
        }

        .layui-nav-child {
          background-color: transparent;
          border-bottom: rgba(255, 255, 255, .2) solid 1px;
          padding: 10px 0;

          .layui-this {
            // background-color: transparent;

            > a {
              color: #fff;
            }
          }

          a {
            background: none !important;
            color: rgba(255, 255, 255, .7);
            line-height: 40px;
            text-indent: 1.5em;
            height: 40px;

            &.layui-nav-item__subtitle {
              text-indent: 0.1em;
            }
          }
        }
      }
    }
  }

  .layui-body {
    position: absolute;
    top: $--top-header-height;
    left: $--left-side-width;
    background-color: #fff;
    bottom: 0;
    z-index: 10;

    .layui-tab-content {
      position: absolute;
      left: 0px;
      right: 0;
      top: 40px;
      bottom: 0;
      padding: 10px;
      width: auto;
      overflow: hidden;
      overflow-y: auto;
      box-sizing: border-box;
    }

    .layadmin-tabsbody-item {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      overflow: hidden;
      display: none;

      .layadmin-iframe {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
      }
    }
  }

  .layui-footer {
    left: $--left-side-width;
    z-index: 999999;
  }

  .layui-nav .layui-this:after,
  .layui-nav-bar,
  .layui-nav-tree .layui-nav-itemed:after {
    background-color: #205b9e;
  }

  .layui-nav-tree .layui-nav-child dd.layui-this,
  .layui-nav-tree .layui-nav-child dd.layui-this a,
  .layui-nav-tree .layui-this,
  .layui-nav-tree .layui-this > a,
  .layui-nav-tree .layui-this > a:hover {
    background-color: #205b9e;
  }

  .open_shrink {
    position: absolute;
    top: 50%;
    margin-top: -40px;
    left: 0px;
    border-color: transparent transparent transparent #052040;
    border-style: solid none solid solid;
    border-width: 20px 0 20px 20px;
    height: 40px;
    width: 0;
    cursor: pointer;

    span {
      position: absolute;
      top: 50%;
      left: -13px;
      margin-top: -4px;
      border-color: transparent transparent transparent #fff;
      border-style: solid none solid solid;
      border-width: 4px 0 4px 6px;
      height: 0;
      width: 0;
      opacity: .7;
    }

    &.open span {
      transform: rotate(-180deg);
    }
    &:hover span {
      opacity: 1;
    }
  }
}